package model;

import java.util.HashMap;
import java.util.Map;

public class Store
{
    private static Store instance = new Store();
    
    public static final String DEFAULT_STORE_ID = "hk";
    
    public static final String STORE_NUM = "store_id";
    
    public static final String STORE_NAME = "store_name";
    
    public static final String PREFIX_EMAIL = "prefix_email";
    
    private Map<String, HashMap<String, String>> storesMap = new HashMap<String, HashMap<String, String>>();
    
    private Store()
    {
        HashMap<String, String> storeMap = new HashMap<String, String>();
        storeMap.put(STORE_NUM, "R428");
        storeMap.put(STORE_NAME, "香港IFC");
        storeMap.put(PREFIX_EMAIL, "junhehk01-");
        storesMap.put(DEFAULT_STORE_ID, storeMap);
    }

    public static Store getInstance()
    {
        return instance;
    }
    
    public HashMap<String, String> getStoreMap(String storeId)
    {
        if (storesMap.get(storeId) == null)
        {
            return storesMap.get(DEFAULT_STORE_ID);
        }
        return storesMap.get(storeId);
    }
}
